import App from './mobile/Appform.vue'
import { getI18n } from './services/lang'

const Vue = window.Vue
const VueRouter = window.VueRouter

Vue.config.productionTip = false

getI18n(window.appNameEn).then(res => {
  window.i18nLang = res && res.datas || {}
})

const routes = [{
  name: 'home',
  path: '/', 
  component: App
}]

// 3. 创建 router 实例，然后传 `routes` 配置
// 你还可以传别的配置参数, 不过先这么简单着吧。
const router = new VueRouter({
  routes // (缩写) 相当于 routes: routes
})

const vm = new Vue({
  template: '<router-view></router-view>',
  router
}).$mount()

document.body.appendChild(vm.$el)
